package com.ihr360.rest.service;

import com.ihr360.message.modal.WxMpProgramTemplateMessage;
import com.ihr360.message.modal.WxMpTemplateMessage;
import com.ihr360.rest.service.fallback.IrenshiWeixinServiceFallback;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * 微信模板消息通知服务
 * <p>
 * Created by tom on 18-1-30.
 */

@FeignClient(name = "irenshi-weixin", fallback = IrenshiWeixinServiceFallback.class, path = "weixin")
public interface IrenshiWeixinService {


    @RequestMapping(value = "/template/message/send/batch", method = RequestMethod.POST)
    boolean templateMsgSendBatch(@RequestBody List<WxMpTemplateMessage> messageList);

    @RequestMapping(value = "/template/message/send/single", method = RequestMethod.POST)
    boolean templateMsgSendSignle(@RequestBody WxMpTemplateMessage messageList);
    
    @RequestMapping(value = "/program/message/send/batch", method = RequestMethod.POST)
    boolean programTemplateMsgSendBatch(@RequestBody List<WxMpProgramTemplateMessage> messageList);

    @RequestMapping(value = "/weixinprogram/getShorUrl", method = RequestMethod.POST)
    String getShorUrl(@RequestBody String url);


}
